package top.xchch.creational.decorator;

import lombok.Data;

@Data
public class Decorator extends Drink {
    protected Drink drink;

    @Override
    public float cost() {
        return super.price * super.num + drink.cost();
    }

    @Override
    public String getDesc() {
        return super.num + " 个 " + super.desc + "; " + drink.getDesc();
    }


}
